using TimeToGo.Formatters;
using System;

namespace TimeToGo.Formatters
{
    public class SecondDurationFormatter : DurationFormatterBase
    {
        public SecondDurationFormatter(string formatString)
            : base(formatString)
        { }

        public override string Name
        {
            get { return "Second formatter"; }
        }

        protected override string FormatDuration(TimeSpan duration)
        {
            return string.Format(FormatString, (int)duration.TotalSeconds);
        }
    }
}